package com.zlx.mapper;

import com.zlx.entities.Student;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Author 周罗校
 * @Description
 * @ClassName StudentMapper
 * @date 2020.10.09 11:49:13
 * 该版权归周罗校所有，最终解释权以官方为准
 */

@Transactional
public interface StudentMapper {
    //添加学生
    int addStudent(Student student);
    //根据id删除学生
    int deleteStudentById(Integer id);
    //根据id修改学生
    int updateStudentById(Student student);
    //根据id查用户
//    @Select("select * from student where stu_id = #{id}")
    Student findStudentById(Integer id);

    Student findStudentByNameAndPs(Student student);

    List<Student> listStudent();

    List<Student> ListAll(@Param("index") Integer index, @Param("size") Integer size);
}
